package me.tonywang.quartz.entity;

import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * JOB运行信息 存储JOB运行日志
 * </p>
 *
 * @author tony.wang
 * @since 2018-05-21
 */
@TableName("t_qrtz_crontask_run_log")
public class CrontaskRunLog extends Model<CrontaskRunLog> {

    private static final long serialVersionUID = 1L;

    /**
     * 编号
     */
	private String id;
    /**
     * jobGroup.jobName
     */
	@TableField("job_key")
	private String jobKey;
    /**
     * 任务名 quartz 中的 triggerName jobName 两者保持和name一致
     */
	@TableField("job_name")
	private String jobName;
    /**
     * 任务分组 分组任务
     */
	@TableField("job_group")
	private String jobGroup;
    /**
     * springBeanName spring容器中提供的bean
     */
	@TableField("target_bean_name")
	private String targetBeanName;
    /**
     * targetMethod spring容器中提供的bean提供的方法
     */
	@TableField("target_method")
	private String targetMethod;
    /**
     * 请求字符串 推荐使用JSON字符串
     */
	@TableField("request_obj")
	private String requestObj;
    /**
     * job运行状态 只表示JOB运行状态，业务的成功失败需JOB自己分辨
     */
	private String ok;
    /**
     * method返回结果 method返回结果
     */
	private String result;
    /**
     * 异常信息 JOB运行异常信息，如HTTP请求时，远程主机不可访问等
     */
	private String errmsg;
    /**
     * 运行时长 默认是0（试验字段）
     */
	@TableField("cost_time")
	private Long costTime;
    /**
     * 上次触发时间 描述
     */
	@TableField("prev_fire_time")
	private Date prevFireTime;
    /**
     * 计划触发时间 计划触发时间
     */
	@TableField("sched_fire_time")
	private Date schedFireTime;
    /**
     * 下次触发时间 下次触发时间
     */
	@TableField("next_fire_time")
	private Date nextFireTime;
    /**
     * 实际触发时间 实际触发时间
     */
	@TableField("fire_time")
	private Date fireTime;
    /**
     * 完成时间 完成时间
     */
	@TableField("finish_time")
	private Date finishTime;
    /**
     * 集群节点 集群节点
     */
	@TableField("sched_inst")
	private String schedInst;
    /**
     * 集群名 集群名
     */
	@TableField("sched_name")
	private String schedName;


	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getJobKey() {
		return jobKey;
	}

	public void setJobKey(String jobKey) {
		this.jobKey = jobKey;
	}

	public String getJobName() {
		return jobName;
	}

	public void setJobName(String jobName) {
		this.jobName = jobName;
	}

	public String getJobGroup() {
		return jobGroup;
	}

	public void setJobGroup(String jobGroup) {
		this.jobGroup = jobGroup;
	}

	public String getTargetBeanName() {
		return targetBeanName;
	}

	public void setTargetBeanName(String targetBeanName) {
		this.targetBeanName = targetBeanName;
	}

	public String getTargetMethod() {
		return targetMethod;
	}

	public void setTargetMethod(String targetMethod) {
		this.targetMethod = targetMethod;
	}

	public String getRequestObj() {
		return requestObj;
	}

	public void setRequestObj(String requestObj) {
		this.requestObj = requestObj;
	}

	public String getOk() {
		return ok;
	}

	public void setOk(String ok) {
		this.ok = ok;
	}

	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}

	public String getErrmsg() {
		return errmsg;
	}

	public void setErrmsg(String errmsg) {
		this.errmsg = errmsg;
	}

	public Long getCostTime() {
		return costTime;
	}

	public void setCostTime(Long costTime) {
		this.costTime = costTime;
	}

	public Date getPrevFireTime() {
		return prevFireTime;
	}

	public void setPrevFireTime(Date prevFireTime) {
		this.prevFireTime = prevFireTime;
	}

	public Date getSchedFireTime() {
		return schedFireTime;
	}

	public void setSchedFireTime(Date schedFireTime) {
		this.schedFireTime = schedFireTime;
	}

	public Date getNextFireTime() {
		return nextFireTime;
	}

	public void setNextFireTime(Date nextFireTime) {
		this.nextFireTime = nextFireTime;
	}

	public Date getFireTime() {
		return fireTime;
	}

	public void setFireTime(Date fireTime) {
		this.fireTime = fireTime;
	}

	public Date getFinishTime() {
		return finishTime;
	}

	public void setFinishTime(Date finishTime) {
		this.finishTime = finishTime;
	}

	public String getSchedInst() {
		return schedInst;
	}

	public void setSchedInst(String schedInst) {
		this.schedInst = schedInst;
	}

	public String getSchedName() {
		return schedName;
	}

	public void setSchedName(String schedName) {
		this.schedName = schedName;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

}
